package com.samsungmobile.common_module.Bean;

public abstract class Item {

	public enum ItemType {track,album,genre}
	
	protected String imgageTooltip = "";
	protected String shortTitle = "";

	protected final static int MaxTitleLen = 13;
	protected final static int MaxAuthorLen = 16;
	protected static String encoding = "UTF-8";
	
	protected String errorImagePath = "/images/common/noimg/noimg_album.gif";

	protected abstract void updateTooltips();
	
	public abstract void escapeHtml();
	public abstract void unescapeHtml();
	
	protected String createShortString(String input, int maxLen) {
		String shortString = input;
		if(input!= null && !input.equals("") && input.length() > maxLen) {
			shortString = input.substring(0, (maxLen - 3)) + "[...]";
		}
		return shortString;
	}
	
	public String getShortTitle() {
		return shortTitle;
	}

	public String getImageTooltip() {
		return imgageTooltip;
	}
	
	public String getErrorImagePath() {
		return errorImagePath;
	}

	public void setErrorImagePath(String errorImagePath) {
		this.errorImagePath = errorImagePath;
	}
}
